package top.zxybird.yun.serialization.thrift;

public class ZigZagHelper {

  public static long longToZigZag(long l) {
    return (l << 1) ^ (l >> 63);
  }

  public static int intToZigZag(int n) {
    return (n << 1) ^ (n >> 31);
  }

}
